package com.ruoyi.quality.domain.bo;

import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * 质量问题业务对象 quality_physical_defect
 *
 * @author ruoyi
 * @date 2023-07-31
 */

@Data
@EqualsAndHashCode(callSuper = true)
public class QualityPhysicalDefectBo extends BaseEntity {

    /**
     * 编号
     */
    @NotNull(message = "编号不能为空", groups = { EditGroup.class })
    private Long defectId;

    /**
     * 通报id
     */
    @NotNull(message = "通报id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long reportId;

    /**
     * 件号
     */
    @NotBlank(message = "件号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String partNumber;

    /**
     * 名称
     */
    @NotBlank(message = "名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String partName;

    /**
     * 分类
     */
    @NotBlank(message = "分类不能为空", groups = { AddGroup.class, EditGroup.class })
    private String defectClassification;

    /**
     * 责任工号
     */
    @NotNull(message = "责任工号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String workersId;

    /**
     * 责任人
     */
    @NotBlank(message = "责任人不能为空", groups = { AddGroup.class, EditGroup.class })
    private String workersName;

    /**
     * 图片
     */
    @NotBlank(message = "图片不能为空", groups = { AddGroup.class, EditGroup.class })
    private String defectPicture;

    /**
     * 罚款
     */
    @NotNull(message = "罚款不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer defectFine;

    /**
     * 部门
     */
    @NotBlank(message = "部门不能为空", groups = { AddGroup.class, EditGroup.class })
    private String deptAbbreviation;

    /**
     * 日期
     */
    @NotNull(message = "日期不能为空", groups = { AddGroup.class, EditGroup.class })
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date defectDate;


}
